package com.bw.service.impl;

import com.bw.mapper.SysUserRoleMapper;
import com.bw.service.SysUserRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class SysUserRoleServiceImpl implements SysUserRoleService {
    @Autowired
    private SysUserRoleMapper sysUserRoleMapper;

    @Override
    public void add(Integer userId, Integer[] roleId) {
        for (Integer integer : roleId) {
            sysUserRoleMapper.add(userId,integer);
        }
    }
}
